package appconfig

import "github.com/spf13/viper"

type Appconf struct {
	Mysql
	Redis
}
type Mysql struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}
type Redis struct {
	Password string
	Host     string
	Port     int
	Database int
}

var Appconfig Appconf

func Init() {
	viper.SetConfigFile("appconfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&Appconfig)
}
